using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using QuanLyKhachSan.BUS;
using QuanLyKhachSan.DAO;
using QuanLyKhachSan.DTO;

namespace QuanLyKhachSan.BUS
{
    public class ChiTietHoaDonBUS
    {
        public enum ChiTietHoaDonBUSResult
        {
            OK,
            SONGAYTHUEERROR,
            DONGIAERROR,
            THANHTIENERROR,
            DAOERROR
        }

        public static DataTable LayDSChiTietHoaDon(int maHoaDon)
        {
            return ChiTietHoaDonDAO.LayDSChiTietHoaDon(maHoaDon);
        }

        public static ChiTietHoaDonBUSResult Insert(ChiTietHoaDonDTO hoaDondto)
        {
            if (!ChiTietHoaDonDAO.Insert(hoaDondto))
                return ChiTietHoaDonBUSResult.DAOERROR;
            return ChiTietHoaDonBUSResult.OK;
        }
    }
}
